package pl.edu.agh.experts.diseases.commons;

import java.util.HashMap;
import java.util.Map;

// @formatter:off
public enum MetaKnowledge {

	PainTroubles("Dolegliwości bólowe", "Czy dokucza Ci różnego rodzaju ból?", new Symptom[] {
			Symptom.Headache, Symptom.BurningHeartache, Symptom.ClenchedHeartache },
			new Decision[] { Decision.No, Decision.No, Decision.No }),

	SleepingTroubles("Problemy ze snem", "Czy masz problemy ze snem?", new Symptom[] {
			Symptom.Insomnia, Symptom.Sleepiness }, new Decision[] { Decision.No, Decision.No }),

	MentalDiscomfort("Dyskomfort psychiczny", "Czy odczuwasz dyskomfort psychiczny?",
			new Symptom[] { Symptom.Anxiety, Symptom.Tiredness, Symptom.Sorrow }, new Decision[] {
					Decision.No, Decision.No, Decision.No }),

	NervousnessSymptoms("Symptomy zdenerwowania",
			"Czy miewasz symptomy zdenerwowania bez jawnej przyczyny?", new Symptom[] {
					Symptom.Anxiety, Symptom.StrongHeartBeating, Symptom.ClimbingHeartToThroat,
					Symptom.Diaphorese, Symptom.ColdFeelings }, new Decision[] { Decision.No,
					Decision.No, Decision.No, Decision.No, Decision.No }),

	PressureMeasurement("Wyniki pomiarów ciśnienia",
			"Czy znasz wyniki pomiarów swojego ciśnienia?", new Symptom[] { Symptom.SlowPulse,
					Symptom.FastPulse }, new Decision[] { Decision.Maybe, Decision.Maybe }),

	ChestDiscomfort("Dyskomfort okolic klatki piersiowej",
			"Czy odczuwasz dyskomfort okolicy klatki piersiowej?", new Symptom[] {
					Symptom.StrongHeartBeating, Symptom.BurningHeartache,
					Symptom.ClenchedHeartache, Symptom.ChestPulsation, Symptom.PulseDisorders },
			new Decision[] { Decision.No, Decision.No, Decision.No, Decision.No, Decision.No }),

	Hallucinations("Omamy", "Czy pamiętasz przeżywane ostatnio omamy słuchowe bądź wzrokowe?",
			new Symptom[] { Symptom.BuzzingInTheEars, Symptom.TwinklingEyes }, new Decision[] {
					Decision.Maybe, Decision.Maybe });
	// @formatter:on

	private String name;
	private String question;
	private Map<Symptom, Decision> knowledge;

	private MetaKnowledge(String name, String question, Symptom symptoms[], Decision decision[]) {
		this.name = name;
		this.question = question;
		this.knowledge = new HashMap<Symptom, Decision>();
		for (int i = 0; i < symptoms.length; i++) {
			knowledge.put(symptoms[i], decision[i]);
		}
	}

	public String getName() {
		return name;
	}

	public String getQuestion() {
		return question;
	}

	public Map<Symptom, Decision> getKnoweledge() {
		return knowledge;
	}
}
